/*
 *  Port.h
 *  GraphPaper
 *
 *  Created by Olivier Namet on 20/04/2010.
 *  Copyright 2010 Home. All rights reserved.
 *
 */

#ifndef PORT_H
#define PORT_H

#include <iostream>
#include <stdlib.h>



//#include "Cell.h"
//#include "Edge.h"
#include "Pos.h"

#include "GraphElement.h"

class Cell;
class Edge;


class Port : public GraphElement
{

public:
	Port(std::string s, Cell *c);
	
	std::string getName() {return name;}
	void setName(std::string n) {name = n;}
	
	Pos *getPos() {return &pos;}
	void setPos(Pos *v) {pos.setX(v->getX());pos.setY(v->getY());}

	Pos *getLabelPos() {return &labelPos;}
	void setLabellPos(Pos *v) {labelPos.setX(v->getX());labelPos.setY(v->getY());}


	float getX() {return pos.getX();}
	float getY() {return pos.getY();}
	
	Cell *getCell() {return cell;}
	void setCell(Cell *c) {cell = c;}
	
	Edge *getEdge() {return edge;}
	void setEdge(Edge *e) {edge = e;}
	
	
	
private:
	static int portCount;
	
	std::string name;
	Pos pos,labelPos;
	Cell *cell;
	Edge *edge;




};


#endif
